$themes: (
  "dark": (
    bgColor: #000,
    textColor: #FFF,
    buttonTextColor: #cdd320,
    buttonBgColor: #00ffff,
  ),
  "light": (
    bgColor: #fff,
    textColor: #000,
    buttonTextColor: #cdd320,
    buttonBgColor: #e2099a,
  ),
);

$currentTheme: "light";
@mixin useTheme() {
  @each $key, $value in $themes {
    $currentTheme: $key !global;
    html[data-theme="#{$key}"] & { //& 自己本身
      @content;
    }
  }
}
@function getValue($paramName) {
  $themeMap: map-get($themes, $currentTheme);
  @return map-get($themeMap, $paramName);
}

// .item {
//   @include useTheme {
//     background: getValue("bgColor");
//     color: getValue("textColor");
//   }
// }
